
<!DOCTYPE html>
<html>
<head>

	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<title>资源视图</title>
	<script src="/static/evaluate/js/echarts/dist/echarts.js"></script>
  <script src="/static/evaluate/js/jquery.js"></script>
  <script type="text/javascript">
      require.config({
          paths: {
              echarts: '/static/evaluate/js/echarts/dist'
          }
      });
      
      // 使用
      require(
          [
              'echarts',
              'echarts/chart/pie', // 使用柱状图就加载bar模块，按需加载
              'echarts/chart/funnel'
          ],
          function (ec) {
              // 基于准备好的dom，初始化echarts图表
              var myChart1 = ec.init(document.getElementById('main1')); 
              var myChart2 = ec.init(document.getElementById('main2')); 
              var key1='总体';
              var key2='测试';
              	 $.ajax({
                          type: "POST",
                            url:"{% url 's_e_enviroment' %}",
                            dataType: "json",
                            success: function(data){
                              // alert([''+key1+''])
                               myChart1.setOption(data[''+'总体'+'']);
                               myChart2.setOption(data[''+'测试'+'']); 
                            },
                            error:function(){
                              
                            }
                        });
              // myChart.setOption(option);	
          } 	 	 
      );
        
    </script>
    
    <script>
  
    </script>
</head>
<body>	
	<div id="main1" style="height:200px;width:800px;">	
	</div>
  <div id="main2" style="height:200px;width:800px;">
</body>

</html>